Repository navigation
feat(lint): refuse a transferBehavior cascade the Change Owner action can never offer - #37382
Conversation
… can never offer Claude-Session: https://claude.ai/code/session_01Utp6CbdHk3orAeensH6EzS Co-authored-by: Claude <noreply@anthropic.com>
…sals Claude-Session: https://claude.ai/code/session_01Utp6CbdHk3orAeensH6EzS Co-authored-by: Claude <noreply@anthropic.com>
…dger Claude-Session: https://claude.ai/code/session_01Utp6CbdHk3orAeensH6EzS Co-authored-by: Claude <noreply@anthropic.com>
…ansfer-cascade-lint
Claude-Session: https://claude.ai/code/session_01Utp6CbdHk3orAeensH6EzS Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 176 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin f13af1dc014a8c6819c02500dda8f683bbabd108 && git checkout f13af1dc014a8c6819c02500dda8f683bbabd108
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ff6f9768d2969c4f2f42819f461424965238e30f df622665dbdf34a43b0790ac4887404f7281a802 && git checkout -B drift-repro ff6f9768d2969c4f2f42819f461424965238e30f && git merge --no-ff df622665dbdf34a43b0790ac4887404f7281a802
node scripts/docs-audit/affected-docs.mjs --json ff6f9768d2969c4f2f42819f461424965238e30f
|
… narrowed Claude-Session: https://claude.ai/code/session_01Utp6CbdHk3orAeensH6EzS Co-authored-by: Claude <noreply@anthropic.com>
…e reference-target arbiter Claude-Session: https://claude.ai/code/session_01Utp6CbdHk3orAeensH6EzS Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS Final head for L1 + L2 · area o5-D · 2026-11-26T01:47Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head ffd2cb6 · 2026-11-26T01:48Z The seat runs the at-tier contract review of this head through an isolated sub-agent; L1 is the seat's own. |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: Inputs read: card #36714 (body, triage 7102255110, claim 7177897953, dev report 7178906203, claim amendment 7180121254), the PR body, the net diff ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing against the published spec on
No must-fix. S1 and S2 are text and a card; neither changes what the rule refuses. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
…rossing named as follow-up #37397 Claude-Session: https://claude.ai/code/session_01Utp6CbdHk3orAeensH6EzS Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head df62266 · 2026-11-26T02:43Z The seat runs the at-tier contract review of this head through an isolated sub-agent; L1 is the seat's own. |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: Delta review. The prior record of this session reviewed ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing against the published spec on
No must-fix and no should-fix open. The delta breaks nothing: it adds one changeset paragraph and two comments, and every check-run on this head is success or skipped. N1 to N3 stand as nits; N1 is not in #37397's scope and may ride with it or be left. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS Landing · area o5-D · 2026-11-26T02:49Z · on L1 ACCEPT 7181123147 and contract review PASS 7181096465 at
State: ready + auto-merge now; on MERGED the area closes out #36714 ( |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 维护者速读
席位意见:ACCEPT。拒收集合与运行时永不提供的集合一致,收窄仪式齐全(BREAKING 横幅、ADR-0087 标记、迁移说明、dogfood)。上一条核对把落地条款写成「无需治理」是席位的错,申报收窄须人工批准,本条更正。 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Approval requested (declared narrowing: |
Requested by Bill · project thread
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
Fixes #36714
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #35769 (row 7178935378: skills/objectstack-data/rules/relationships.md, the three lint refusals)
维护者速读
What changes
A
transferBehavior: 'cascade'that the Change Owner endpoint can never offer used to parse silently (ADR-0049, declared but not enforced). One new@objectstack/lintrule,validateTransferCascades, refuses each of the card's three cases aterror, with the fix in the hint:@objectstack/spec/data)transfer-cascade-parent-without-change-ownerresolveUserActionTransfer+transferIneligibilityReason(what the endpoint'schangeOwnerOffReasonasks)transfer-cascade-extension-child-ineligibleobjectExtensions[].fieldsfield cascades onto an object that cannot take a cascadetransferCascadeIneligibilityReason(whatrefuseIneligibleTransferCascadesandtransferCascadeRelationsask)transfer-cascade-child-update-unexposedenableblock does not serveupdateapiExposureDenialReason(canServeApiOperationis its boolean face, the exposure filter intransferCascadeRelations)packages/lint/src/validate-transfer-cascades.ts: the walk only. Objects are judged as served (objectsAsServed, every extension field folded in), sincetransferCascadeRelationsreads the registered, merged definitions. An object the stack does not declare is skipped on either side. Only single-valuelookup/master_detailfields are judged; off-type, multi-value andsys_-parent cascades stay the field parse's refusals and are not reported twice.authoring-rules.ts:gating, all three commands,surfaces: CLI_ONLYwith asurfaceReason(see Acceptance notes). Exported from the barrel (rule ids included), and the three ids haveos explainentries inrule-explanations.ts(inserted, not reordered).packages/spec/src/migrations/entries/semantic/18.transfer-cascade-never-offered-refused.ts: the ADR-0087 ledger entrycheck:adr-0087-registrationrequires for aMetadata-protocol: narrowedchangeset. It is a data file, not a schema change.content/docs/api/data-api.mdxbeside the existing multi-value refusal, and the CLI transcripts' author-time rule count 79 → 80 (check:docs-transcript-drift).@objectstack/lintminor,@objectstack/specminor (the kind isnarrowed).Mechanism assumptions measured at
origin/main98bda0a before code: A1 holds (the predicates are exported from@objectstack/spec/data; lint imports them the wayvalidate-managed-api-methods.tsdoes, no third copy). A2:error, followingvalidateManagedApiMethods(a declaration decidable from the stack that the runtime silently drops) and the parse's own refusal of the declaring object's half. A3 holds (child.enablethrough the exposure predicate). A4: the twovalidate-predicate-path-refs.test.tspins count form predicates, not registry entries; nothing moved.Files to read first, by risk:
packages/lint/src/validate-transfer-cascades.ts—validateTransferCascades, the served-object lookup and thesys_/ not-declared skips.packages/lint/src/authoring-rules.ts— the new entry's tier andsurfaceReason.packages/spec/src/migrations/entries/semantic/18.transfer-cascade-never-offered-refused.ts.Tests
packages/lint/src/validate-transfer-cascades-36714.test.ts: every fixture is a fullObjectSchema/ObjectExtensionSchemaparse, so each refusal is one the parse lets through. Each case is refused with its rule, severity,where,pathand the reason fragment its message names; each eligible shape passes (an eligible parent, a parent outside the stack, asys_parent, an eligible extension target, a target outside the stack,updateserved); thepackages[]artifact shape is read; and thefieldPatchesarm is pinned as refused by the schema.Local runs at 3e1fa4a (lint, spec, ablation)
pnpm --filter @objectstack/lint test: Test Files 236 passed (236), Tests 9648 passed, 5 skipped (VERDICT command-exit 0).pnpm --filter @objectstack/lint typecheck: VERDICT command-exit 0.pnpm --filter @objectstack/spec test: Test Files 894 passed, 1 skipped (895), Tests 28417 passed (VERDICT command-exit 0).pnpm --filter @objectstack/cli exec vitest run test/migrate-meta-engine-guidance.test.ts: 3 passed.scripts/ablation-replace.mjsreplaced the walk'sfor (const site of cascadeSites(stack))with an empty loop, x0 -> x1 on disk; the card's test file went 15 failed, 9 passed (24). Every refusal case red, every pass case green. Restored: blob == HEAD,git diff HEADempty.Acceptance notes
Clause-②:line carries the(narrowing)arm (body and changeset, commit 8737482): Check Changeset readsMetadata-protocol: narrowedbeside a clause line without the arm as a contradiction. The claim'sClause-②: nowas copied first, at 3e1fa4a.fieldPatchesarm cannot occur. A field patch carries display properties only (label,description,inlineHelpText,placeholder), andObjectExtensionSchemarefusestransferBehaviorthere as an unrecognized key, so the rule walks extensionfieldsonly; a test pins the refusal.surfaces: CLI_ONLY): the door's objects are served definitions carrying the injectedowner_idas a declared field, which the eligibility predicate reads (itsreadonly, and on an external object whether it is declared). Crossing owes that measurement or a read-back to the authored shape, aslintDuplicateFieldLabelsdoes. Until then a Studio or MCP save of these shapes still passes. The runtime stays safe.packages/spec/src/migrations/entries/semantic/is outside the claim's listed surface.check:adr-0087-registrationrequires it fornarrowed; it changes no schema and no runtime.check:docs-transcript-driftred.Verification
Two-minute check:
pnpm --filter @objectstack/lint exec vitest run src/validate-transfer-cascades-36714.test.tsprints 24 passed.Gates: local derivation and reconciliation
node scripts/pm/dispatch-gates.mjs --ranat 3e1fa4a: 117 derived, 113 run, 4 NOT-MEASURED, 0 UNRUN. All 113 run exited 0. NOT-MEASURED, left to CI:check:type-check-debt: the 300 s local timeout fired (repo-wide tsc census).check-plugin-teardown-shape.mjs --self-test: shallow checkout.spec check:skill-examples: its client SDK surface readspackages/client-reactdist, not built locally.check:dual-build-cjs-loads: reads every workspace dist.Outside the derivation, local-only:
check:dev-prereqsexit 1, because 104 of 110 workspace packages are unbuilt in this container (machine state, not this diff).🤖 Generated with Claude Code